package com.amit.hibernate;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;

public class Lab1Client2 {

	public static void main(String[] args) 
	{
		SessionFactory sessionfactory =CHibernateutil.getfactory();
		Session session=sessionfactory.openSession();
		
		Transaction tx=session.beginTransaction();
		Customer cust=(Customer) session.load(Customer.class, 2);
		System.out.println(cust.getCid()+" "+cust.getCname()+" "+cust.getCity()+" "+cust.getPhone()+" "+cust.getFee());
		tx.commit();
		session.close();
		
	}

}
